package com.xx.springsecuritydemo.main.service.impl;

import com.xx.springsecuritydemo.main.dao.RoleDao;
import com.xx.springsecuritydemo.main.entity.Role;
import com.xx.springsecuritydemo.main.mapper.RoleMapper;
import com.xx.springsecuritydemo.main.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class RoleServiceImpl implements IRoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> getRolesByUid(Integer uid) {
        return roleMapper.getRolesByUid(uid);
    }

    @Override
    public List<String> getRoleNameByUrl(String requestURI) {
        return roleMapper.getRoleNameByUrl(requestURI);
    }
}
